﻿@{
    Layout = null;

    var list = ViewData["list"] as Pay.TO.PagedResult<Pay.DTO.order_dto>;
   
}
<html>

<head>
    <meta charset="UTF-8">
    <title>待付款</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="format-detection" content="telphone=no, email=no" />
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="msapplication-tap-highlight" content="no">
    <link rel="stylesheet" type="text/css" href="~/Content/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/css/gelunbu.css" />
    <script src="~/Content/js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Content/js/layer/1.9.3/layer.js"></script>
    <script src="~/Content/js/dropload.js" type="text/javascript" charset="utf-8"></script>
    <script src="~/Content/js/web.js"></script>
    <script type="text/javascript">
        function cancel(id) {
            ajax({
                url: '/Order/Cancel',
                data: { Id: id },
                actions:'refresh'
            });
        }
    </script>
    <script type="text/javascript">
        function jump(url) {
            window.location.href = "/Order/" + url;
        }
    </script>
</head>

<body style="background: #F0F0F0;">
    <ul id="tab">
        <li onclick="jump('OrderStayAll')">全部</li>
        <li class="current" onclick="jump('OrderStayPay')">待付款</li>
        <li onclick="jump('OrderStayDeliver')">待发货</li>
        <li onclick="jump('OrderStayReceipt')">待收货</li>
        <li onclick="jump('OrderStayFinish')">已完成</li>
    </ul>
    <!--商品列表-->
    <div id="order"></div>
    <script type="text/javascript">
       $(function () {
           var query = { page: 1, size: 10, order_status:'@Pay.TO.OrderStatus.WaitPay' };
           var dropload = $('#order').dropload({
               scrollArea: window,
               loadDownFn: function (me) {
                   $.ajax({
                       url: '/Order/_OrderStayAll', type: "post", data: query,
                       success: function (response) {
                           var paged = $(response).siblings("page");
                           if (paged.length == 1) {
                               query.result += Number.parseInt(paged.attr("rows"));
                               $('#order').append($(response));
                               $('#order page').remove();
                               query.page++;
                           } else {
                               me.lock();
                               me.noData();
                           }
                           me.resetload();
                       },
                       error: function (xhr, type) {
                           me.lock();
                           me.noData();
                           me.resetload();
                       }
                   });
               }
           });
       });
    </script>
</body>

</html>
<script type="text/javascript">
       function Pay(payno) {
           ajax({
               url: '/CheckOut/Pay',
               data: { pay_no: payno },
               actions:'system'
           });
    }
</script>

